package com.jastar.android.jigsaw.util;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;

public class BitmapUtil {

    public static Bitmap addBorder(Bitmap src, int borderWidth, int borderColor) {
        Paint paint = new Paint();
        paint.setStyle(Paint.Style.STROKE);
        paint.setStrokeWidth(borderWidth);
        paint.setColor(borderColor);
        return addRect(src, paint);
    }

    public static Bitmap addRect(Bitmap src, Paint paint) {
        new Canvas(src).drawRect(0, 0, src.getWidth(), src.getHeight(), paint);
        return src;
    }

}